<%@ include file="include.jsp" %>
<!-- start main page -->

<div id="content-wrap">
<div id="main">


<h3><b>${drug.name}<c:if test="${rating.rating > 0}" > - Rating: ${rating.rating} out of 5</c:if></b>
<br/>
<br/>
<a href="reviewBegin.html">Leave a review for ${drug.name}</a></h3>
<hr />

<h3>Why Is This Medication Prescribed</h3>
<p>${drug.whyIsThisMedicationPrescribed}
</p>
<h3>Treats</h3>
<p>${drug.treats}
</p>
<h3>Other Brand Names</h3>
<p>${drug.otherBrands}
</p>
<h3>Class of Drug:</h3>
<p>${drug.classOfDrug}</p>
<h3>Side Effects</h3>
<p>${drug.sideEffects}
</p>
<h3>Warnings</h3>
<p>${drug.warnings}
</p>
<h3><a href="reviewBegin.html">Leave a review for ${drug.name}</a></h3>
</div>

<div id="sidebar">
<div style="text-align: left;">
<c:if test="${!empty review.rating}">
<h3>${drug.name}'s latest review...</h3>
<p>
<br/><b>Overall rating:</b> ${review.rating} <br/><br/>
<b>Reason for taking this drug:</b> <br/>${review.reasonForTaking} <br/><br/>
<b>Your review:</b> <br/>${review.reviewText} <br/><br/>
<b>Date of review:</b> ${review.date} <br/><br/>
<b>Personal Experience:</b><br/>
<c:choose> 
  <c:when test='${review.positiveReview}'> 
     <FONT COLOR="green">This user overall had a <b>positive experience</b></FONT>
  </c:when> 
  <c:otherwise> 
     <FONT COLOR="red">This user overall had a <b>negative experience</b></FONT>
  </c:otherwise> 
  
</c:choose> 
</p>
<h3><a href="allDrugReviews.html">Read All Reviews!</a></h3>
</c:if>
</div>
</div>
</div>





<!-- end main page -->
